import { getPreAuthVO } from '@/services/OpenService'
import { PageContainer } from '@ant-design/pro-components'
import { useRequest } from 'ahooks'
import { Button } from 'antd'
import React from 'react'

const Demo: React.FC = () => {
  const { data: preAuthVO, run } = useRequest(getPreAuthVO, { manual: true })
  return (
    <>
      <PageContainer title={'测试页面'}>
        <div>{preAuthVO?.preAuthUrl}</div>
        <a href={preAuthVO?.preAuthUrl}>跳转</a>
        <Button onClick={run}>获取授权链接</Button>
      </PageContainer>
    </>
  )
}

export default Demo
